/**
 * Created by yanxiaoyao on 17/03/07.
 */
'use.strict';
define(['app'],function(app){
   app.register.directive('label', function (OEMIDTRUE) {
       return {
           restrict: 'A',
           link: function (scope, element, attr) {
           		element.bind("click",function(){
           			if($(this).hasClass('background')){
           				$(this).removeClass('background');
           				OEMIDTRUE.set('i', "") 
           			}else{
           				$(this).addClass('background');
           				$(this).siblings().removeClass('background');
						OEMIDTRUE.set('i', $(this).html()) 
           			}
           			
           		})
           }
       }
   });
   app.register.directive('label1', function (OEMIDTRUE) {
       return {
           restrict: 'A',
           link: function (scope, element, attr) {
           		element.bind("click",function(){
           			if($(this).hasClass('background')){
           				$(this).removeClass('background');
           				OEMIDTRUE.settwo('i',"")
           			}else{
           				$(this).addClass('background');
           				$(this).siblings().removeClass('background');
           				OEMIDTRUE.settwo('i', $(this).html()) 
           			}
           			
           		})
           }
       }
   });
   app.register.directive('label2', function (OEMIDTRUE) {
       return {
           restrict: 'A',
           link: function (scope, element, attr) {
           		element.bind("click",function(){
           			if($(this).hasClass('background')){
           				$(this).removeClass('background');
           				OEMIDTRUE.setthree('i', "") 
           			}else{
           				$(this).addClass('background');
           				$(this).siblings().removeClass('background');
           				OEMIDTRUE.setthree('i', $(this).html()); 
           			}
           			
           		})
           }
       }
   });
});